/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cr.ac.una.sive.entidadLocal;


import cr.ac.una.sive.entidad.Marchamo;
import java.math.BigInteger;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;



/**
 *
 * @author claribel
 */
public class MarchamoLocal extends Marchamo {
    
    
    private boolean selected;
  
    private Date fechaActual = getDefaultDate();
     public static final String DEFAULT_PATTERN = "dd/MM/yyyy"; 
     
    public MarchamoLocal(Marchamo marchamo){
       
        this.setEstadoMarchamo(marchamo.getEstadoMarchamo());
        this.setFechaCreacion(marchamo.getFechaCreacion());
        this.setFechaVigencia(marchamo.getFechaVigencia());
        this.setIdMarchamo(marchamo.getIdMarchamo());
        this.setTipoMarchamo(marchamo.getTipoMarchamo());
        this.setNumeroMarchamo(marchamo.getNumeroMarchamo());
        this.setUsuario(marchamo.getUsuario());
        this.setVehiculo(marchamo.getVehiculo());
        
          this.selected = false;
    }
    public MarchamoLocal(){
       super();
       this.setEstadoMarchamo('1');
    }
    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public boolean isSelected() {
        return selected;
    }  
    public void setFechaActual(Date fechaActual) {
        this.fechaActual = fechaActual;
    }

    public Date getFechaActual() {
        return fechaActual;
    }
    public String getPattern() { return DEFAULT_PATTERN; }
    /**
     * Convenience method to get a default current date
     */
    public static Date getDefaultDate() {
        return getDefaultDate(TimeZone.getDefault());
    }
    
    /**
     * Convenience method to get a default current date in the specified timezone
     */
    public static Date getDefaultDate(TimeZone timezone) {
        return Calendar.getInstance(timezone).getTime();
    }
}
